

package com.hazelcast.config;

/**
 * Eviction Policy enum.
 */
public enum EvictionPolicy {
    /**
     * Least Recently Used
     */
    LRU(0),
    /**
     * Least Frequently Used
     */
    LFU(1),
    /**
     * None
     */
    NONE(2),
    /**
     * Randomly
     */
    RANDOM(3);

    private static final EvictionPolicy[] VALUES = values();

    private final int id;

    EvictionPolicy(int id) {
        this.id = id;
    }

    public static EvictionPolicy getById(int id) {
        return VALUES[id];
    }

    public int getId() {
        return id;
    }
}
